FIG. 1 illustrates several components that may be included in a typical UNIX file system (UFS). Available space of a disk storage system 3 is generally shared by one or more file systems such as file system A (8) and file system B (9). File systems define the use of data storage devices that offer access to an array of fixed-size blocks, or sectors. The file system software is responsible for organizing these sectors into files and directories, and keeping track of which sectors belong to which file and which are not being used.
A UNIX file system (UFS) is a file system used by many UNIX and Unix-like operating systems. Each Unix file system is composed of a group of boot blocks, a superblock and a collection of cylinder groups (CGs). The boot block stores code which is used to initialize the file system. The superblock stores statistical, geometric and behavioral tuning parameters associated with the file system. Each cylinder group (CG) has the following components: a backup copy of the superblock a CG block which stores information to the particular cylinder, a collection of inode data structures that store metadata associated with the cylinder group data blocks, and the cylinder group data blocks. Each CG block entry includes a first portion characterizing the state of the associated cylinder, and a second portion including the cylinder group header of the associated cylinder. The state of the associated cylinder may include a cylinder group number, the block number within the cylinder where the cylinder block resides, state and other cylinder group counters. The cylinder group block stores attribute and inode information for the cylinder, and will generally vary in size from one file system to another based on the inode density of the cylinder group.
A file server such as file server 2 accesses storage devices associated with the file systems. File servers generally includes a memory 4, a portion of which is allocated to the temporary storage of data retrieved from the disk device to increase application performance by the reducing delays associated with I/O disk access. To support a typical UFS file system, the file server allocates a portion of memory to each file system to store a cylinder group cache (CG cache 5,6) for the file system. Each CG cache entry stores an in memory representation of each cylinder block for the associated file system. For example, in FIG. 1 the memory includes FSA CG cache 5 for storing CG block for file system A, and FS CG cache 6 for storing CG blocks for file system B. A CG cache is assembled in memory when each UFS is first mounted, and remains in memory until the associated file system is unmounted.
Storing the CG block in memory as described above allows the file server to more quickly retrieve cylinder information, resulting in faster allocation of and access to data blocks. However, as file systems are mounted and storage for the associated CG caches is reserved in memory, memory can quickly become full. Larger file systems, having concomitantly larger CG caches, will receive a larger allocation of memory, effectively starving out other file systems and reducing the performance of the file server.
One technique that is used to reclaim memory to reduce starvation involves searching the CG block entries of each individual CG cache to determine which CGs are least recently accessed. The cylinder block information associated with the LRU cylinder can be deleted, allowing at least a portion of the memory to be reclaimed for use by other file systems. Generally the file systems control the scanning of the CG caches during a synch period allocated to each file system. CG entries which are determined to be ‘aged’ during the synch period are deleted from memory. While this reclaiming scheme helps to reduce the impact that larger file systems have on file server resources, in heavily loaded storage systems the reclamation may not be sufficient to eliminate memory starvation. In addition, the frequent scanning of CG caches by multiple file systems in the reclaiming scheme reduces the performance of the file server. It would be desirable to identify a CG caching scheme that would overcome the problems of the prior art.